<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-cn">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="css,animate," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="Just-add-water CSS animationv 3.5.2animate.css is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-wate">
<meta property="og:type" content="article">
<meta property="og:title" content="Animate动画">
<meta property="og:url" content="http://tudouabc.oschina.io/2017/02/21/Animate.css/index.html">
<meta property="og:site_name" content="倔强的土豆">
<meta property="og:description" content="Just-add-water CSS animationv 3.5.2animate.css is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-wate">
<meta property="og:updated_time" content="2017-02-21T04:52:25.570Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Animate动画">
<meta name="twitter:description" content="Just-add-water CSS animationv 3.5.2animate.css is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-wate">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://tudouabc.oschina.io/2017/02/21/Animate.css/"/>





  <title> Animate动画 | 倔强的土豆 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-cn">

  














  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">倔强的土豆</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">粘贴过来，鼓励并充实自己~</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocapitalize="off" autocomplete="off" autocorrect="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://tudouabc.oschina.io/2017/02/21/Animate.css/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="倔强的土豆">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/user.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="倔强的土豆">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="倔强的土豆" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Animate动画
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-02-21T14:14:11+08:00">
                2017-02-21
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/css/" itemprop="url" rel="index">
                    <span itemprop="name">css</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Just-add-water CSS animation<br>v 3.5.2<br>animate.css is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.</p>
<a id="more"></a>
<h3 id="可以选用的特效"><a href="#可以选用的特效" class="headerlink" title="可以选用的特效:"></a>可以选用的特效:</h3><h4 id="强调注意"><a href="#强调注意" class="headerlink" title="强调注意"></a>强调注意</h4><ol>
<li>bounce(弹跳)</li>
<li>flash(闪光)</li>
<li>pulse(脉跳)</li>
<li>rubberBand(橡皮圈)</li>
<li>shake(摇动)</li>
<li>headShake</li>
<li>swing</li>
<li>tada</li>
<li>wobble</li>
<li>jello</li>
</ol>
<h4 id="Bouncing-Entrances-跳入"><a href="#Bouncing-Entrances-跳入" class="headerlink" title="Bouncing Entrances(跳入)"></a>Bouncing Entrances(跳入)</h4><ol>
<li>bounceIn</li>
<li>bounceInDown</li>
<li>bounceInLeft</li>
<li>bounceInRight</li>
<li>bounceInUp</li>
</ol>
<h4 id="Bouncing-Exits-跳出"><a href="#Bouncing-Exits-跳出" class="headerlink" title="Bouncing Exits(跳出)"></a>Bouncing Exits(跳出)</h4><ol>
<li>bounceOut</li>
<li>bounceOutDown</li>
<li>bounceOutLeft</li>
<li>bounceOutRight</li>
<li>bounceOutUp</li>
</ol>
<h4 id="Fading-Entrances-淡入"><a href="#Fading-Entrances-淡入" class="headerlink" title="Fading Entrances (淡入)"></a>Fading Entrances (淡入)</h4><ol>
<li>fadeIn</li>
<li>fadeInDown</li>
<li>fadeInDownBig</li>
<li>fadeInLeft</li>
<li>fadeInLeftBig</li>
<li>fadeInRight</li>
<li>fadeInRightBig</li>
<li>fadeInUp</li>
<li>fadeInUpBig</li>
</ol>
<h4 id="Fadeing-Exits-淡出"><a href="#Fadeing-Exits-淡出" class="headerlink" title="Fadeing Exits (淡出)"></a>Fadeing Exits (淡出)</h4><ol>
<li>fadeOut</li>
<li>fadeOutDown</li>
<li>fadeOutDownBig</li>
<li>fadeOutLeft</li>
<li>fadeOutLeftBig</li>
<li>fadeOutRight</li>
<li>fadeOutRightBig</li>
<li>fadeOutUp</li>
<li>fadeOutUpBig</li>
</ol>
<h4 id="Flipper-翻转"><a href="#Flipper-翻转" class="headerlink" title="Flipper (翻转)"></a>Flipper (翻转)</h4><ol>
<li>flipInX</li>
<li>flipInY</li>
<li>flipOutX</li>
<li>flipOutY</li>
</ol>
<h4 id="Lightspeed-光动画"><a href="#Lightspeed-光动画" class="headerlink" title="Lightspeed (光动画)"></a>Lightspeed (光动画)</h4><ol>
<li>lightSpeedIn</li>
<li>lightSpeedOut</li>
</ol>
<h4 id="Rotating-Entrances-旋转进入"><a href="#Rotating-Entrances-旋转进入" class="headerlink" title="Rotating Entrances (旋转进入)"></a>Rotating Entrances (旋转进入)</h4><ol>
<li>rotateIn</li>
<li>rotateInDownLeft</li>
<li>rotateInDownRight</li>
<li>rotateInUpLeft</li>
<li>rotateInUpRight</li>
</ol>
<h4 id="Rotating-Exits-旋转淡出"><a href="#Rotating-Exits-旋转淡出" class="headerlink" title="Rotating Exits (旋转淡出)"></a>Rotating Exits (旋转淡出)</h4><ol>
<li>rotateOut</li>
<li>rotateOutDownLeft</li>
<li>rotateOutDownRight</li>
<li>rotateOutUpLeft</li>
<li>rotateOutUpRight</li>
</ol>
<h4 id="Zoom-Entrances-放大进入"><a href="#Zoom-Entrances-放大进入" class="headerlink" title="Zoom Entrances (放大进入)"></a>Zoom Entrances (放大进入)</h4><ol>
<li>zoomIn (放大)</li>
<li>zoomInDown</li>
<li>zoomInLeft</li>
<li>zoomInRight</li>
<li>zoomInUp</li>
</ol>
<h4 id="Zoom-Exits-缩小淡出"><a href="#Zoom-Exits-缩小淡出" class="headerlink" title="Zoom Exits (缩小淡出)"></a>Zoom Exits (缩小淡出)</h4><ol>
<li>zoomOut (缩小)</li>
<li>zoomOutDown</li>
<li>zoomOutLeft</li>
<li>zoomOutRight</li>
<li>zoomOutUp</li>
</ol>
<h4 id="Sliding-Entrances-滑入"><a href="#Sliding-Entrances-滑入" class="headerlink" title="Sliding Entrances (滑入)"></a>Sliding Entrances (滑入)</h4><ol>
<li>slideInDown(向下滑入)</li>
<li>slideInLeft(左边滑入)</li>
<li>slideInRight(右边滑入)</li>
<li>slideInUp(向上滑入)</li>
</ol>
<h4 id="Sliding-Exits-滑出"><a href="#Sliding-Exits-滑出" class="headerlink" title="Sliding Exits (滑出)"></a>Sliding Exits (滑出)</h4><ol>
<li>slideOutDown</li>
<li>slideOutLeft</li>
<li>slideOutRight</li>
<li>slideOutUp</li>
</ol>
<h4 id="specials-特殊"><a href="#specials-特殊" class="headerlink" title="specials (特殊)"></a>specials (特殊)</h4><ol>
<li>hinge</li>
<li>rollIn</li>
<li>rollOut</li>
</ol>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/css/" rel="tag"># css</a>
          
            <a href="/tags/animate/" rel="tag"># animate</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/12/25/GolangProcessControl/" rel="next" title="Go流程控制">
                <i class="fa fa-chevron-left"></i> Go流程控制
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/02/21/toml-v0.4.0/" rel="prev" title="TOML v0.4.0 脚本配置语言">
                TOML v0.4.0 脚本配置语言 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/user.jpg"
               alt="倔强的土豆" />
          <p class="site-author-name" itemprop="name">倔强的土豆</p>
           
              <p class="site-description motion-element" itemprop="description">学习和整理web技术，方面自己查阅，也希望方便他人</p>
          
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">10</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">6</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">16</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#可以选用的特效"><span class="nav-number">1.</span> <span class="nav-text">可以选用的特效:</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#强调注意"><span class="nav-number">1.1.</span> <span class="nav-text">强调注意</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Bouncing-Entrances-跳入"><span class="nav-number">1.2.</span> <span class="nav-text">Bouncing Entrances(跳入)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Bouncing-Exits-跳出"><span class="nav-number">1.3.</span> <span class="nav-text">Bouncing Exits(跳出)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Fading-Entrances-淡入"><span class="nav-number">1.4.</span> <span class="nav-text">Fading Entrances (淡入)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Fadeing-Exits-淡出"><span class="nav-number">1.5.</span> <span class="nav-text">Fadeing Exits (淡出)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Flipper-翻转"><span class="nav-number">1.6.</span> <span class="nav-text">Flipper (翻转)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Lightspeed-光动画"><span class="nav-number">1.7.</span> <span class="nav-text">Lightspeed (光动画)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Rotating-Entrances-旋转进入"><span class="nav-number">1.8.</span> <span class="nav-text">Rotating Entrances (旋转进入)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Rotating-Exits-旋转淡出"><span class="nav-number">1.9.</span> <span class="nav-text">Rotating Exits (旋转淡出)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Zoom-Entrances-放大进入"><span class="nav-number">1.10.</span> <span class="nav-text">Zoom Entrances (放大进入)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Zoom-Exits-缩小淡出"><span class="nav-number">1.11.</span> <span class="nav-text">Zoom Exits (缩小淡出)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Sliding-Entrances-滑入"><span class="nav-number">1.12.</span> <span class="nav-text">Sliding Entrances (滑入)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Sliding-Exits-滑出"><span class="nav-number">1.13.</span> <span class="nav-text">Sliding Exits (滑出)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#specials-特殊"><span class="nav-number">1.14.</span> <span class="nav-text">specials (特殊)</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">倔强的土豆</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    
    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  



  
  
  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length == 0) {
      search_path = "search.xml";
    }
    var path = "/" + search_path;
    // monitor main search box;

    function proceedsearch() {
      $("body").append('<div class="popoverlay">').css('overflow', 'hidden');
      $('.popup').toggle();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      $.ajax({
        url: path,
        dataType: "xml",
        async: true,
        success: function( xmlResponse ) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = $( "entry", xmlResponse ).map(function() {
            return {
              title: $( "title", this ).text(),
              content: $("content",this).text(),
              url: $( "url" , this).text()
            };
          }).get();
          var $input = document.getElementById(search_id);
          var $resultContent = document.getElementById(content_id);
          $input.addEventListener('input', function(){
            var matchcounts = 0;
            var str='<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length > 1) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var content_index = [];
                var data_title = data.title.trim().toLowerCase();
                var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
                var data_url = decodeURIComponent(data.url);
                var index_title = -1;
                var index_content = -1;
                var first_occur = -1;
                // only match artiles with not empty titles and contents
                if(data_title != '') {
                  keywords.forEach(function(keyword, i) {
                    index_title = data_title.indexOf(keyword);
                    index_content = data_content.indexOf(keyword);
                    if( index_title >= 0 || index_content >= 0 ){
                      isMatch = true;
                      if (i == 0) {
                        first_occur = index_content;
                      }
                    }

                  });
                }
                // show search results
                if (isMatch) {
                  matchcounts += 1;
                  str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
                  var content = data.content.trim().replace(/<[^>]+>/g,"");
                  if (first_occur >= 0) {
                    // cut out 100 characters
                    var start = first_occur - 20;
                    var end = first_occur + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if(start == 0){
                      end = 50;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    var match_content = content.substring(start, end);
                    // highlight all keywords
                    keywords.forEach(function(keyword){
                      var regS = new RegExp(keyword, "gi");
                      match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
                    });

                    str += "<p class=\"search-result\">" + match_content +"...</p>"
                  }
                  str += "</li>";
                }
              })};
            str += "</ul>";
            if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
            if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
            $resultContent.innerHTML = str;
          });
          proceedsearch();
        }
      });}

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched == false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(function(e){
      $('.popup').hide();
      $(".popoverlay").remove();
      $('body').css('overflow', '');
    });
    $('.popup').click(function(e){
      e.stopPropagation();
    });
  </script>


  

  

  

  


  

</body>
</html>
